<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="content-type" content="text/html;charset=UTF-8">
    <title>Title</title>
    <style>
        a {
            text-decoration: none;
            color: #1b1616;
        }
        .comstyle {
            width: 20px;
            height: 20px;
            text-align: center;
            line-height: 20px;
            float: left;
        }
    </style>


</head>
<body>
<!--加减输入框示例，如图：-->
<img src="../image/3.png" alt="">

<!--实现-->
<!--最外层的框-->
<div style="border: solid 1px darkgrey;width: 80px;height: 20px">
    <!--左侧框-->
    <div  class="comstyle" style="border-right: solid 1px darkgray;">
        <a href="#">-</a>
    </div>
    <!--中间输入框-->
    <div style="width: 40px;text-align: center;line-height: 20px;float: left;">
        <input type="text" style="border: 0; width: 40px; display: block;height: 18px;" value="1">
    </div>
    <!--右侧框-->
    <div style="border-left:solid 1px darkgray; width: 18px;text-align: center;line-height: 20px;float:left;">
        <a href="#">+</a>
    </div>
</div>

</body>
</html>